import 'package:fluro/fluro.dart';
import 'package:flutter/cupertino.dart';
import 'package:pwd_keeper/router/router_handler.dart';

class Routes {
  static void configureRoutes(Router router) {
    router.notFoundHandler = new Handler(
      // 页面不存在的时候处理函数
      // ignore: missing_return
      handlerFunc: (BuildContext context, Map<String, List<String>> params) {
        print('找不到该路由');
        print(params);
      },
    );

    router.define(
      'create_keeper_page',
      handler: createKeeperPageHandler,
      transitionType: TransitionType.nativeModal,
    );

    router.define(
      'keeper_detail_page',
      handler: keeperDetailPageHandler,
      transitionType: TransitionType.nativeModal,
    );
  }
}
